Inside Macintosh: Sound

| Chapter contents | Next |

Sound Components

This chapter describes sound components, which are code modules used by the Sound Manager to manipulate audio data or to communicate with sound output devices. Current versions of the Sound Manager allow you to write two kinds of sound components:

You need to read this chapter only if you are developing a sound output device or if you want to implement a custom compression and decompression scheme for audio data. For example, you might write a codec to handle 16-bit audio data compression and decompression. (The MACE algorithms currently compress and expand only 8-bit data at ratios of 3:1 and 6:1.)

Sound components are loaded and managed by the Sound Manager and operate transparently to applications. Applications that want to create sounds must use Sound Manager routines to do so. The routines described in this chapter are intended for use exclusively by sound components.

To use this chapter, you should already be familiar with the general operation of the Sound Manager, as described in the chapter "Introduction to Sound on the Macintoshhandlink" in this book. Because sound components are components, you also need to be familiar with the Component Manager, described in Inside Macintosh: More Macintosh Toolbox . If you are developing a sound output device component, you need to be familiar with the process of installing a driver and handling interrupts created by your hardware device. See Inside Macintosh: Devices for complete information on devices and device drivers.

If you're developing a sound output device, you might also need to write a control panel extension that installs a custom subpanel into the Sound control panel. For example, your subpanel could allow the user to set various characteristics of the sound your output device is creating. For complete information on writing control panel subpanels, see the chapter "Control Panel Extensions" in Inside Macintosh: Operating System Utilities .

This chapter begins with a general description of sound components and how they are managed by the Sound Manager. Then it provides instructions on how to write a sound component. The section "Sound Components Reference" describes the sound component selectors your component might need to handle and the component-defined routines that your sound component should call in response to those the sound component selectors. It also describes a small number of Sound Manager utility routines that your sound component can use.

Pascal interfaces for sound components are not currently available. As a result, this chapter provides all source code examples and reference materials in C.

Contents

About Sound Components

Writing a Sound Component

Sound Components Reference


© 1998 Apple Computer, Inc.

| Chapter contents | Next |